The GIL¶
The Global Interpreter Lock (GIL) is a mutex in CPython that prevents multiple native threads from executing Python bytecode simultaneously. It simplifies memory management and C-extension integration but limits CPU-bound parallelism in multi-threaded programs; CPU-bound workloads typically use multiprocessing or async I/O instead. Python 3.13 introduced an experimental “free-threaded” mode that removes the GIL.
See also¶
Page last modified: 2026-04-06 20:35:09